package com.huilian.iotbox.data.service.impl;

import com.huilian.iotbox.data.dao.PermissionCommonDao;
import com.huilian.iotbox.data.po.Permission;
import com.huilian.iotbox.data.service.PermissionCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class PermissionCommonServiceImpl implements PermissionCommonService {

    @Autowired
    private PermissionCommonDao permissionCommonDao;

    @Override
    public List<Permission> findAllNoAuthPermissionByPlatformType(Integer platformType) {
        return permissionCommonDao.findAllNoAuthPermissionByPlatformType(platformType);
    }

    @Override
    public List<Permission> findUserPermission(Integer userId, Integer permissionPlatformType) {
        return permissionCommonDao.findUserPermission(userId, permissionPlatformType);
    }

    @Override
    public List<Permission> findUserPermissionV2(Integer userId, Integer permissionPlatformType) {
        return permissionCommonDao.findUserPermissionV2(userId, permissionPlatformType);
    }
}
